
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
	<title>可用可信家庭市场</title>
	<!--                       CSS                       -->
	<!-- Reset Stylesheet -->
	<link rel="stylesheet" href="/static/css/reset.css" type="text/css" media="screen" />
	<!-- Main Stylesheet -->
	<link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
	<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
	<link rel="stylesheet" href="/static/css/invalid.css" type="text/css" media="screen" />
	<!--                       Javascripts                       -->
	<!-- jQuery -->
	<script type="text/javascript" src="/static/scripts/jquery-1.3.2.min.js"></script>
	<!-- jQuery Configuration -->
	<script type="text/javascript" src="/static/scripts/simpla.jquery.configuration.js"></script>
	<!-- Facebox jQuery Plugin -->
	<script type="text/javascript" src="/static/scripts/facebox.js"></script>
	<!-- jQuery WYSIWYG Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.wysiwyg.js"></script>
	<!-- jQuery Datepicker Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.datePicker.js"></script>
	<script type="text/javascript" src="/static/scripts/jquery.date.js"></script>
	<!-- jQuery -->
	<link rel="stylesheet" type="text/css" media="all" href="/static/css/motai.css">
	<script type="text/javascript" charset="utf-8" src="/static/js/jquery.leanModal.min.js"></script>
	<script language="javascript" src="/static/js/LodopFuncs.js"></script>
	
	<style>
		
		.pmain{
			width:58mm;
			height:900px;
			background-color:white;
			margin-left:500px;
		}
       .print {
       	padding:0;margin: 0;
       	width:80mm;
       	font-size:12px;
       }
       .print h1{font-size: 15px;}
       .print h3{font-size: 14px;}
       .print .left{
            float: left;
        }
        .print .right{
            float:right;
        }
       .print .clearfix{
            clear: both;
        }
       .print ul{list-style: none;}
        .print .print_container{
            padding: 20px;
            width: 188px;
            	line-height:15px;
        }
       .print .section1{
       		line-height:15px;
        }
       .print .section2 label{
       		line-height:15px;
           font-size:12px;
        }
       .print .section3 label{
       		line-height:15px;
           
        }
       .print .section4{
       		line-height:15px;
       		
        }
       .print .section4 .total label{
            display: block;
        }
       .print .section4 .other_fee{
            border-bottom: 1px solid #DADADA;
        }
       .print .section5 label{
            display: block;
            
        }
        </style>
</head>
<body>
<div id="body-wrapper">
	<!-- Wrapper for the radial gradient background -->
	<div id="sidebar">
		<div id="sidebar-wrapper">

			<div id="profile-links">
				<!-- Logo (221px wide) -->
				<a href="#"><img id="logo" src="/static/images/logo.png" alt="Simpla Admin logo" /></a>

				{$_COOKIE['user_name']},你好 <br/>
				| <a href="/index.php/index/index/uexit" title="Sign Out">退出</a> </div>

			 <ul id="main-nav">
                <!-- Accordion Menu -->
                <!--<li> <a href="#/" class="nav-top-item no-submenu">-->
                    <!--&lt;!&ndash; Add the class "no-submenu" to menu items with no sub menu &ndash;&gt;-->
                    <!--Dashboard </a> </li>-->
                {if condition="!empty($powers['order_action'])"}
                <li> <a href="#" class="nav-top-item current"> 订单操作</a>
                    <ul>
                    	
                        <li><a class="current" href="/index.php/index/index/neworder_list">新订单</a></li>
                        <!-- Add class "current" to sub menu items also -->
                        <li><a href="/index.php/index/index/addorder">创建新订单</a></li>
                        <li><a href="/index.php/index/index/allorder_list">所有订单</a></li>
                    </ul>
                </li>
           	{/if}
           	 {if condition="!empty($powers['cg_action'])"}
                <li> <a href="#" class="nav-top-item"> 采购单 </a>
                    <ul>
                        <li><a href="/index.php/index/index/newcg_list">待处理 采购单</a></li>
                        <li><a href="/index.php/index/index/cg_history">采购单历史</a></li>
                    </ul>
                </li>
             {/if}
              {if condition="!empty($powers['table_action'])"}
                <li> <a href="#" class="nav-top-item"> 报表 </a>
                    <ul>
                        <li><a href="/index.php/index/biao/daybiao">日报表</a></li>
                        <li><a href="/index.php/index/biao/yuebiao">月报表</a></li>
                        <li><a href="/index.php/index/biao/nianbiao">年报表</a></li>
                    </ul>
                </li>
               {/if}
                {if condition="!empty($powers['goods_action'])"}
                <li> <a href="#" class="nav-top-item">菜品管理 </a>
                    <ul>
                        <li><a href="/index.php/index/goods/goods">所有菜品</a></li>
                        <li><a href="/index.php/index/goods/categorys">所有分类</a></li>
                    </ul>
                </li>
                {/if}
                 {if condition="!empty($powers['promotion_action'])"}
                 <li> <a href="#" class="nav-top-item"> 推广活动 </a>
                    <ul>
                        <li><a href="/index.php/index/promotion/snlist">SN优惠码</a></li>
                    </ul>
                </li>
                {/if}
                
                <li> <a href="#" class="nav-top-item"> 个人信息 </a>
                    <ul>
                        <li><a href="/index.php/index/index/user_info">查看信息</a></li>
                        <li><a href="/index.php/index/index/update_pass">修改密码</a></li>
                    </ul>
                </li>
       
                {if condition="!empty($powers['super'])"}
                 <li><a href="#" class="nav-top-item"> 用户管理 </a>
                 	<ul>
                        <li><a href="/index.php/index/admin/user_admin">用户权限</a></li>
                    </ul>
                 </li>
                {/if}

            </ul>
            <!-- End #main-nav -->
		</div>
	</div>
	<!-- End #sidebar -->
	<a style="margin-left:750px;float:left;" href="javascript:history.back()" ><<返回</a> 
	<button type="button" onclick="printPage(1,{$order['order_id']})" style="margin-left:50px;float:left;" class="button medium back">打印</button>

	
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
	<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="install_lodop32.exe"></embed>
</object> 

<div class="pmain" id="pmain">
	<!--startprint1-->
	<div id="print">
	  
        <div class="print_container">
            <h3 style="text-align:center;">
            	配送单
            </h3>
            <div class="section1">
               <label > 可用可信家庭市场</label><br />
            </div>
            <span>**************************</span>
            <div class="section2" style="line-height:23px;">
            	<label>订单号：{$order['order_id']}</label><br />
                <label>配送日期：
                	{if condition="!empty($v.ps_date)"}
							{$order.ps_date|date='Y-m-d',###}
					{else/}
							{$order.create_time|date='Y-m-d',###}
					{/if}
                </label><br />
                <label>配送时间：
                	{if condition="!empty($order.desc_time)"}
						{$order.desc_time}
					{else/}
                						{if condition="($order.ps_time == 9)"}9:00-10:00
											{elseif condition="$order.ps_time == 10"}10:00-11:00
											{elseif condition="$order.ps_time == 11"}11:00-12:00

											{elseif condition="$order.ps_time == 15"}15:00-16:00
											{elseif condition="$order.ps_time == 16"}16:00-17:00
											{elseif condition="$order.ps_time == 17"}17:00-18:00
											{else /}
										{/if}
					{/if}
                </label>
            </div>
            <span>**************************</span>
           
            <div class="section4">
                <div style="border-bottom: 1px solid #DADADA;">
                    <!--<ul>
                        <div>菜单名称     数量    金额</div>
                        <li>米饭米饭 米饭 米饭 米饭 米饭 米饭       2    28元</li>
                        <li>米饭      2    28元</li>
                    </ul>-->
                    <table style="width: 100%;line-height:18px;font-size:13px;">
                        <thead>
                            <tr>
                                <td width="35%">菜品数量</td>
                                <td width="20%">规格</td>
                                <td width="10%" style="text-align:center;">总价</td>
                            </tr>
                        </thead>
                        <tbody>
                        	<?php $cout=0;$sum=0;?>
                        	{volist name="$order['menu']" id="vo"}
                        	<?php $sum+=$vo['allprice'];?>
							<?php ++$cout;?>
                            <tr style="line-height:23px;">
                                <td><?php echo  mb_substr($vo['name'],0,6,'utf-8');?>&nbsp;*{$vo.num}</td>
                                <td>{$vo.guige}</td>
                                <td style="text-align:center;">{$vo['allprice']}</td>
                            </tr>
                            {/volist}
                             <tr>
                            	<td>
                            		<br/>
                            		总金额：{$sum}
                            	</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            <span>**************************</span>
             
            <div class="section5" style="line-height:25px;">
            	<label>顾客备注：{$order.desc}</label><br />
                <label>完成时间：</label><br />
                
                <label>配送员：</label>
                
               
            </div>    
        </div>

	</div>
	<!--endprint1-->
</div>
	


	
	<!-- End #main-content -->
</div>


<script src="http://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.min.js"></script>

<script>
	function printPage(k,e)
	{
		var bdhtml=window.document.body.innerHTML;//获取当前页面html代码
		var sprnstr= "<!--startprint"+k+"-->" ;
		var eprnstr= "<!--endprint"+k+"-->" ;
		var prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18);
		prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
		window.document.body.innerHTML=prnhtml;
		window.print();
		window.document.body.innerHTML=bdhtml;
		
		if(confirm("是否打印成功？打印成功后，该订单将移到已打印配送单"))
        {location.href="/index.php/index/index/printps2/order_id/"+e;}
        else
        {location.href="";}
	
	}

</script>

</body>
</html>
